package com.csun.cmny.provider.model.dto.watch;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-01-18 09:45
 * @Description:
 */
@Data
@ApiModel(value = "编辑孝心手环白名单Dto")
public class EditWatchWhiteListDto implements Serializable {

    private static final long serialVersionUID = -7477235378383653238L;

    /**
     * 设备Id
     */
    @NotNull(message = "{device.id.null}")
    private Long deviceId;

    /**
     * 电话号码
     */
    @NotEmpty(message = "{watch.config.white.list.phone.empty}")
    @Pattern(regexp = "^((\\+86)|(86))?(13|15|16|17|18|19)\\d{9}$",
            message = "{watch.config.white.list.phone.pattern}")
    private String phone;

    /**
     * 要修改的序号 从0开始计数
     */
    @NotNull(message = "{watch.config.white.list.phone.number.null}")
    @Range(min = 0, message = "{watch.config.white.list.phone.number.range}")
    private Integer number;
}
